﻿    @model List<Exam>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>考试信息</title>
        <link href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" rel="stylesheet">
    </head>
    <body>
        <!--展示数据的主窗口-->
        <div class="container mt-5">
            <div class="row">
                <div class="col-md-12">
                    <div class="card">
                      @*   <div class="card-header bg-primary text-white">
                            <form asp-action="SltJump" asp-controller="ExamPlan" class="my-4">
                                查找考试计划：<input type="text" class="text-black-50" name="exam_plan_name" />
                                <input type="submit" class="btn btn-warning edit-btn" value="查询" />
                            </form>
                        </div> *@
                        <div class="card-body">
                            <table class="table table-striped">
                                <thead>
                                    <tr>
                                        <th>考试名称</th>
                                        <th>考试描述</th>
                                        <th>负责教师</th>
                                        <th>开始时间</th>
                                        <th>结束时间</th>
                                        <th>审核状态</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @foreach (var exam in Model)
                                    {
                                        <tr>
                                            <td>@exam.exam_plan_name</td>
                                            <td>@exam.exam_plan_desc</td>
                                            <td>@exam.teacher_id</td>
                                            <td>@exam.begin_time</td>
                                            <td>@exam.end_time</td>
                                            <td>@exam.approval_status</td>
                                            @* <td>
                                               <form asp-action="DelSumbit" asp-controller="ExamPlan" method="post" class="my-4">
                                                    <input type="hidden" name="exam_plan_name" value="@exam.exam_plan_name" />
                                                    <input type="submit" class="btn btn-danger delete-btn" value="删除考试">
                                                </form> 
                                            </td>
                                            <td>
                                                <form asp-action="UpdJump" asp-controller="ExamPlan" class="my-4">
                                                    <input type="hidden" name="exam_plan_name" value="@exam.exam_plan_name" />
                                                    <input type="submit" class="btn btn-warning edit-btn" value="修改">
                                                </form> 
                                            </td> *@
                                        </tr>
                                    }
                                </tbody>
                            </table>
                            <!-- Bootstrap 分页组件 -->
                            <nav aria-label="Page navigation example">
                                <ul class="pagination justify-content-center">
                                    <li class="page-item"><a class="page-link" href="#">上一页</a></li>
                                    <li class="page-item"><a class="page-link" href="#">1</a></li>
                                    <li class="page-item"><a class="page-link" href="#">下一页</a></li>
                                </ul>
                            </nav>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>
    </html>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script>

    <script>
        // 如果 TempData["Message"] 有内容，则显示一个 alert 对话框
        @if (TempData["Message"] != null)
        {
            <text>
                alert("@Html.Raw(TempData["Message"])");
            </text>
        }
    </script>
